<!DOCTYPE html>
<html>
<head>
<meta charset="$_G[charset]" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>$_CFG[sitename] - 手机版</title>
<link rel="stylesheet" href="{URLROOT}/{$_G[tplurl_mobile]}/css/base.css?{$_G[modoer][build]}" />
<link rel="stylesheet" href="{URLROOT}/{$_G[tplurl_mobile]}/css/index.css?{$_G[modoer][build]}" />
<script src="{URLROOT}/data/cachefiles/config.js?{$_G[cfg][js_cache_flag]}"></script>
<script src="{URLROOT}/static/mobile/js/jquery.js?{$_G[modoer][build]}"></script>
</head>
<body id="body">
<a name="top"></a>
<header>
    <div class="header">
        <a href="{url mobile/citys}" class="header-left">
            $_CITY[name]<span class="icon18-white icon18-stand icon18-extend off"></span>
        </a>
        <p class="header-title">
            <a href="{url mobile/index}">
                <img width="172" height="32" src="{URLROOT}/{$_G[tplurl_mobile]}/images/logo.png">
            </a>
        </p>
        <a href="{url member/mobile}" class="header-right">
            <img src="{URLROOT}/{$_G[tplurl_mobile]}/images/avatar.png" class="header-img">
        </a>
    </div>
</header>

<div class="panel-body search">
    <form action="{print U('modoer/index',true,'normal')}" method="get">
        <input type="hidden" name="m" value="item">
        <input type="hidden" name="act" value="mobile">
        <input type="hidden" name="do" value="search">
        <input name="keyword" type="search" class="search-keyword" placeholder="搜索主题" autocomplete="off">
        <input type="submit" value="搜主题" class="icon18 icon18-search search-button">
    </form>
</div>

<!-- 图片尺寸 304X80 -->
<div class="swipe-box">
    <div id="slider" class="swipe">
        <div class="swipe-wrap">
            {eval $piccount=0;}
            {get:modoer val=bcastr(groupname/mobile/city_id/_NULL_CITYID_)}
            {eval $piccount++;}
            <figure>
                <div class="wrap">
                    <div class="image">
                        <a href="$val[item_url]" title="$val[itemtitle]">
                            <img src="{URLROOT}/$val[link]" alt="$val[itemtitle]" width="300" height="80">
                        </a>
                    </div>
                </div>
            </figure>
            {/get}
            {if !$piccount}
            <figure>
                <div class="wrap">
                    <div class="image">
                        <p style="width:300px;">增加轮换图片，请在后台-网站管理-图片轮换页面新增图片，“图片组名称”写：mobile</p>
                    </div>
                </div>
            </figure>
            {/if}
        </div>
    </div>
</div>

<div class="activities">
    <div class="container">
        <!-- 九宫格 -->
        <div class="list">
            <ul>
                <li class="one-img">
                    <div class="app">
                        <ul>
                            {loop $menus $link}
                            <li><dl><a href="$link[url]"><dt><img src="{img $link[iconurl]}" width="46" height="46" alt=""></dt></a><dd>$link[title]</dd></dl></li>
                            {/loop}
                        </ul>
                    </div>
                </li>
            </ul>
            <div class="clear"></div>
        </div>
        <!-- 内容聚合 -->
        <div class="tabbox">
            <div class="tabs-hd">
                    <ul class="tabs">
                    <li class="selected" data-tab="finer"><a href="javascript:;">推荐商家</a></li>
                    <li data-tab="hot"><a href="javascript:;">热门商家</a></li>
                    <li data-tab="new"><a href="javascript:;">最新加入</a></li>
                </ul>
                <div class="clear"></div>
            </div>
            <div class="tab-show" data-tab="finer">
                <ul class="subjects">
                    {get:modoer val=table(table/dbpre_subject/select/sid,aid,name,subname,avgsort,thumb/where/status=1 AND finer>0 AND city_id IN(_NULL_CITYID_)/orderby/finer DESC/rows/6/cachetime/1000)}
                    <li>
                        <div class="subject-item">
                            <a href="{url item/mobile/do/detail/id/$val[sid]}"><img src="{URLROOT}/{if $val[thumb]}$val[thumb]{else}static/images/noimg.gif{/if}" alt="$val[name].$val[subname]" title="$val[name].$val[subname]" /></a>
                            <span class="subject-title"><a href="{url item/mobile/do/detail/id/$val[sid]}" title="$val[name].$val[subname]">{sublen $val[name].$val[subname],10}</a></span>
                        </div>
                    </li>
                    {/get}
                </ul>
            </div>
            <div class="tab-show none" data-tab="hot">
                <ul class="subjects">
                    {get:modoer val=table(table/dbpre_subject/select/sid,aid,name,subname,avgsort,thumb/where/status=1 AND reviews>0 AND city_id IN(_NULL_CITYID_)/orderby/reviews DESC/rows/6/cachetime/1000)}
                    <li>
                        <div class="subject-item">
                            <a href="{url item/mobile/do/detail/id/$val[sid]}"><img src="{URLROOT}/{if $val[thumb]}$val[thumb]{else}static/images/noimg.gif{/if}" alt="$val[name].$val[subname]" title="$val[name].$val[subname]" /></a>
                            <span class="subject-title"><a href="{url item/mobile/do/detail/id/$val[sid]}" title="$val[name].$val[subname]">{sublen $val[name].$val[subname],10}</a></span>
                        </div>
                    </li>
                    {/get}
                </ul>
            </div>
            <div class="tab-show none" data-tab="new">
                <ul class="subjects">
                    {get:modoer val=table(table/dbpre_subject/select/sid,aid,name,subname,avgsort,thumb/where/status=1 AND city_id IN(_NULL_CITYID_)/orderby/addtime DESC/rows/6/cachetime/1000)}
                    <li>
                        <div class="subject-item">
                            <a href="{url item/mobile/do/detail/id/$val[sid]}"><img src="{URLROOT}/{if $val[thumb]}$val[thumb]{else}static/images/noimg.gif{/if}" alt="$val[name].$val[subname]" title="$val[name].$val[subname]" /></a>
                            <span class="subject-title"><a href="{url item/mobile/do/detail/id/$val[sid]}" title="$val[name].$val[subname]">{sublen $val[name].$val[subname],10}</a></span>
                        </div>
                    </li>
                    {/get}
                </ul>
            </div>
            <script>
                $(document).ready(function() {
                    $('div.tabbox .tabs a').each(function(index, el) {
                        $(this).click(function(event) {
                            var tabname = $(this).parent().data('tab');
                            var tabs =  $(this).parent().parent();
                            tabs.find('li').each(function(index, el) {
                                if($(this).data('tab')==tabname) {
                                    $(this).addClass('selected');
                                } else {
                                    $(this).removeClass('selected');
                                }                            
                            });
                            tabs.parent().parent().find('div.tab-show').each(function(index, el) {
                                if($(this).data('tab')==tabname) {
                                    $(this).show();
                                } else {
                                    $(this).hide();
                                } 
                            });
                        });
                    });
                });
            </script>
        </div>
    </div>
</div>

<footer>
    <div class="footer">
        <div>
            {if $user->isLogin}
            <a href="{url member/mobile}">$user->username</a><span style="margin:0 10px;">|</span><a href="{url member/mobile/do/login/op/logout}">退出</a>
            {else}
            <a href="{url member/mobile/do/login}">登录</a><span style="margin:0 10px;">|</span><a href="{url member/mobile/do/reg}">注册</a>
            {/if}
            <span style="margin:0 10px 0 5px;">|</span><a href="{url mobile/index/goto/web}">电脑版</a>
        </div>
        <div class="gray"></div>
     </div>
</footer>

<link rel="stylesheet" href="{URLROOT}/static/mobile/css/plugin.css?{$_G[modoer][build]}" />
<script src="{URLROOT}/static/mobile/js/common.js?{$_G[modoer][build]}"></script>
<script src="{URLROOT}/static/mobile/js/jquery.plugin.js?{$_G[modoer][build]}"></script>
<script src="{URLROOT}/static/mobile/js/swipe.js?{$_G[modoer][build]}"></script>
<script>
$(document).ready(function() {
    Swipe(document.getElementById('slider'), {
        auto: 5000,
        continuous: true
    });
});
</script>

</body>
</html>
<!--{eval output();}-->